package com.lanhai.longheng;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.lanhai.longheng.dao.DeviceGroupDao; 
import com.lanhai.longheng.interfaces.IDevice;

/**
 * 这是测试类
 * @author zhengwei
 *
 */

@Component
public class TestFun {

	@Autowired
	IDevice  iDevice ;
	
	
	public void decideFindNextDevice() {

		String nextProcess = "制绒下料1";
		DeviceGroupDao gbean = null;

		// 起点
		gbean = iDevice.findNextDeviceNospecialline(100, nextProcess );

		if (gbean == null) {
			System.out.println("没有机台");
		} else {
			System.out.println(gbean.getDotno());
		}
	}
	
	
	public void transFindNextDevice() {

		String nextProcess = "扩散1";
		DeviceGroupDao gbean = null;

		// 起点
		gbean = iDevice.findNextDevice(100, nextProcess,1 );

		if (gbean == null) {
			System.out.println("没有机台");
		} else {
			System.out.println(gbean.getDotno());
		}
	}
	 
}
